#! /bin/bash

echo "Generating Linux binaries...";
echo "Deleting old build files...";
rm -f ../../../trunk/build/*
rm -f ../../../trunk/debug/*
rm -f ../../../trunk/release/*
mkdir -p ../../bin/linux/$1
echo "Making Linux binaries...";
cd ../../../trunk/
qmake -o Makefile
make
echo "copying binaries...";
cd bin
cp nagaina ./linux/$1
cd ..
cp LICENSE ./bin/linux/$1
cp CHANGELOG ./bin/linux/$1
cd images
cp nagaina.png ../bin/linux/$1
cd ../bin/linux
echo "Tar-ing files...";
tar -czf $1-linux.tar.gz $1
echo "done.";


